﻿using System.Collections.Generic;
using System.Collections.ObjectModel;
using com.IronOne.BoardPACWinAppBO.Category;
using com.IronOne.BoardPACWinAppBO.Meeting;
using GalaSoft.MvvmLight;

namespace com.IronOne.BoardPACWinAppBO.Agenda
{
    public class AgendaModel : ObservableObject
    {
        //public List<MemberModel> ParticipantsList { get; set; }

        /// <summary>
        ///     The <see cref="ParticipantsList" /> property's name.
        /// </summary>
        public const string ParticipantsListPropertyName = "ParticipantsList";

        public static bool IsExpanded = true;
        private ObservableCollection<MemberModel> _participantsListPropertyName;

        //public MeetingModel SelectedMeeting { get; set; }
        /// <summary>
        /// The <see cref="SelectedMeeting" /> property's name.
        /// </summary>
        public const string SelectedMeetingPropertyName = "SelectedMeeting";

        private MeetingModel _sModel = null;

        /// <summary>
        /// Sets and gets the SelectedMeeting property.
        /// Changes to that property's value raise the PropertyChanged event. 
        /// </summary>
        public MeetingModel SelectedMeeting
        {
            get
            {
                return _sModel;
            }

            set
            {
                if (_sModel == value)
                {
                    return;
                }

                _sModel = value;
                RaisePropertyChanged(SelectedMeetingPropertyName);
            }
        }

        //public CategoryModel SelectedCategory { get; set; }
        /// <summary>
        /// The <see cref="SelectedCategory" /> property's name.
        /// </summary>
        public const string SelectedCategoryPropertyName = "SelectedCategory";

        private CategoryModel _selectedCategory = null;

        /// <summary>
        /// Sets and gets the SelectedCategory property.
        /// Changes to that property's value raise the PropertyChanged event. 
        /// </summary>
        public CategoryModel SelectedCategory
        {
            get
            {
                return _selectedCategory;
            }

            set
            {
                if (_selectedCategory == value)
                {
                    return;
                }

                _selectedCategory = value;
                RaisePropertyChanged(SelectedCategoryPropertyName);
            }
        }

        //public SubCategoryModel SelectedSubCategory { get; set; }
        /// <summary>
        /// The <see cref="SelectedSubCategory" /> property's name.
        /// </summary>
        public const string SelectedSubCategoryPropertyName = "SelectedSubCategory";

        private SubCategoryModel _selectedSubCategory = null;

        /// <summary>
        /// Sets and gets the SelectedSubCategory property.
        /// Changes to that property's value raise the PropertyChanged event. 
        /// </summary>
        public SubCategoryModel SelectedSubCategory
        {
            get
            {
                return _selectedSubCategory;
            }

            set
            {
                if (_selectedSubCategory == value)
                {
                    return;
                }

                _selectedSubCategory = value;
                RaisePropertyChanged(SelectedSubCategoryPropertyName);
            }
        }

        //public MemberModel MemberDetails { get; set; }
        /// <summary>
        /// The <see cref="MemberDetails" /> property's name.
        /// </summary>
        public const string MemberDetailsPropertyName = "MemberDetails";

        private MemberModel _memberDetails = null;

        /// <summary>
        /// Sets and gets the MemberDetails property.
        /// Changes to that property's value raise the PropertyChanged event. 
        /// </summary>
        public MemberModel MemberDetails
        {
            get
            {
                return _memberDetails;
            }

            set
            {
                if (_memberDetails == value)
                {
                    return;
                }

                _memberDetails = value;
                RaisePropertyChanged(MemberDetailsPropertyName);
            }
        }

        /// <summary>
        ///     Sets and gets the ParticipantsList property.
        ///     Changes to that property's value raise the PropertyChanged event.
        /// </summary>
        public ObservableCollection<MemberModel> ParticipantsList
        {
            get { return _participantsListPropertyName; }

            set
            {
                if (_participantsListPropertyName == value)
                {
                    return;
                }

                _participantsListPropertyName = value;
                RaisePropertyChanged(ParticipantsListPropertyName);
            }
        }

        public List<string> IndividualParticipationStatusList { get; set; }
        public List<AgendaItem> AgendaItemsList { get; set; }
    }
}